#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>

int main() {
    int hour = 0, minute = 0, a = 0;
    scanf("%d:%d %d", &hour, &minute, &a);
    int b, c;
    b = a / 60;
    c = a % 60;
    hour = hour + b;
    while (hour >= 24)
        hour = hour % 24;
    if ((c + minute) > 60)
    {
        hour = hour + 1;
        minute = (c + minute) % 60;
        printf("%02d:%02d", hour, minute);
    }
    else {
        printf("%02d:%02d", hour, minute + c);
    }

    return 0;
}

#include <stdio.h>

int main() {
    char ch = 0;
    scanf("%c", &ch);
    printf("%d", ch);
    return 0;
}